package com.zt.ftphelper.util;

import java.io.File;
import java.util.Comparator;

/**
 * @author zt
 * @Description:
 * @date 20/08/2019 14:51
 */
@Deprecated
public class FileComparator  implements Comparator<File> {
    @Override
    public int compare(File o1, File o2) {
        if (o1.isDirectory() && o2.isFile())
            return -1;
        if (o1.isFile() && o2.isDirectory())
            return 1;
        return o1.getName().compareTo(o2.getName());
    }
}
